# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ameba
pkgver=1.5.0
pkgrel=1
pkgdesc="static code analysis tool for Crystal"
url="https://github.com/crystal-ameba/ameba"
# others: blocked by crystal
arch="x86_64 aarch64"
license="MIT"
makedepends="
	crystal
	libxml2-dev
	shards
	yaml-dev
	"
source="https://github.com/veelenga/ameba/archive/v$pkgver/ameba-$pkgver.tar.gz
	assign-spec.patch
	"

export CRYSTAL_CACHE_DIR="$srcdir/.cache"

build() {
	make CRFLAGS="--release"
}

check() {
	make test SPEC_FLAGS="--no-color"
}

package() {
	make CRFLAGS="--release" install PREFIX="$pkgdir/usr"
}

sha512sums="
9dfc6470452a007b7c77079764cf15d00e58bbcd1bce2b3775fc77a94502e33a043249d95caa2f729a6beb3c9bdfe2cd1046ee9518c5ba985a7d16129f68dfad  ameba-1.5.0.tar.gz
9b68f3c966770484e07cf615dd881c4c9d4bbab1e1939fea3456d5b77cf3c87dc5576ee9ce4ea69bc0dd54f11029b10546b72c606b14522d94e1ad106397a190  assign-spec.patch
"
